<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<title><?php echo ($name); ?></title>
<script src="__APP__/statics/jquery-1.9.1.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__APP__/statics/css/jNotify.jquery.css" />
<script type="text/javascript" src="__APP__/statics/jNotify.jquery.js"></script>
<style>
 body{font-family:"微软雅黑";font-size:12px;color:#666666;background-color:#F9F9F6}
 *{margin: 0;} 
 a{text-decoration:none}
 img{border:0px}
.cat{background-color:#F9F9F6;margin-left:10px;z-index:0;}
.cat_list:hover{background-color:#fff;}
.title{background:url("__APP__/statics/tbg.gif");font-weight:bold}

#save{text-align:center;border:0;width:100%;height:40px;background-color:#fff;position:fixed;left:0px;bottom:0px;z-index:999;border:1px solid #DFDFDF;background-color:#DFDFDF;padding:5px;height:20px}
</style>

<div class="cat">
<table border="1" bordercolor="#DDDFFF" width="100%" style="border-collapse: collapse" cellpadding="5">
	<tr>
		<td align="right">上级分类：</td>
		<td>
		<select size="1" name="parent">
	       <option value="0">顶级分类</option>

<?php if(is_array($place_list)): $i = 0; $__LIST__ = $place_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$place_list): $mod = ($i % 2 );++$i; if($place_list["place_id"] == $now_place['parent']): ?><option value="<?php echo ($place_list["place_id"]); ?>" selected><?php echo ($place_list["fullname"]); ?></option>
	<?php else: ?>
	      <option value="<?php echo ($place_list["place_id"]); ?>"><?php echo ($place_list["fullname"]); ?></option><?php endif; endforeach; endif; else: echo "" ;endif; ?>
	    </select>　
		</td>
	</tr>
	
	<tr>
		<td align="right">货位名称：</td>
		<td><input type="text" name="place_name" value="<?php echo ($now_place["place_name"]); ?>"></td>
	</tr>

</table>
</div>
<input name="place_id" type="text" value="<?php echo ($now_place["place_id"]); ?>"  style="display:none">
<div id="save"><input id="change" type="button" value="保存更改"></div>

<script src="__APP__/statics/jquery-1.9.1.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__APP__/statics/css/jNotify.jquery.css" />
<script type="text/javascript" src="__APP__/statics/jNotify.jquery.js"></script>
<script>
$(function(){
    $("#change").click(function(){
	    var place_id=$("[name=place_id]").val();
	    var parent=$("[name=parent]").val();
		var place_name=$("[name=place_name]").val();

         $.ajax({
		     type:"POST",
			 url:"__URL__/save_edit",
			 dataType:"json",
			 data:{'place_name':place_name,'place_id':place_id,'parent':parent},
			 success:function(data){
			     if(data=='1'){
				   jSuccess("<strong>修改成功!</strong>",{VerticalPosition : 'center',HorizontalPosition : 'center'});

				 }else{
				   jError("<strong>修改失败！请重试</strong>",{VerticalPosition : 'center',HorizontalPosition : 'center'});
				 }
			 }
		 })
	})

})
</script>
</body>
</html>